﻿// Favorites Task Pane Word Add-In - Attribution notice
// Author(s):
//
//      Stacy Draper (stacyDraper@WildWires.com, http://www.WildWires.com)
//
// This file is distributed under the terms of the Microsoft Community 
// License (Ms-CL). See http://www.codeplex.com/features/Project/License.aspx
// for the complete terms of use. 
// 
// For any distribution that contains code from this file, this notice of 
// attribution must remain intact, and a copy of the license must be 
// provided to the recipient.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Word = Microsoft.Office.Interop.Word;
using Office = Microsoft.Office.Core;


namespace favorites
{
    public partial class ThisAddIn
    {
        Microsoft.Office.Tools.CustomTaskPane myFavorites = null;
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            myFavorites = this.CustomTaskPanes.Add(new SharePointNation.Favorites(), "Favorites");
            myFavorites.Visible = true;
            
        }

        public bool Visible 
        { 
            get
                {
                    return myFavorites.Visible;
                }
        }

        public void Show()
        {
            myFavorites = this.CustomTaskPanes.Add(new SharePointNation.Favorites(), "Favorites");
            myFavorites.Visible = true;
        }

        public void Hide()
        {
            if (myFavorites != null)
            {
                myFavorites.Visible = false;
            }
        }



        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }

        protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
        {
            return new Ribbon1();
        }
        #region VSTO generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }
        
        #endregion
    }
}
